<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>分店管理-添加合同</title>
	<link rel="stylesheet" href="/js/plugin/layui-v2.3.0/layui/css/layui.css">
	<link rel="stylesheet" href="/css/reset.css">
	<link rel="stylesheet" href="/css/index.css">
	<link rel="stylesheet" href="/css/index_team.css">
	<script src='/js/jquery-2.1.1.min.js'></script>
	<script src="/js/plugin/layui-v2.3.0/layui/layui.js"></script>
</head>
<style>
::-webkit-scrollbar-thumb {
  background:#a2a2a2; 
  border-radius: 10px;
  height:50%;
}
::-webkit-scrollbar{width:6px;}
	body{
		overflow-y: scroll;
	} 
</style>
<body>
	<div class="kb-content">	
		<section class="kb-content-container clearfix">
			<div class="sub-step-header">
				<div class="step-content">
					<span>选择合同类型</span>
					<div class="step-num active">1</div>
					<div class="parting-line"></div>
				</div>
				<div class="step-content">
					<span>输入合同细节</span>
					<div class="step-num">2</div>
					<div class="parting-line"></div>
				</div>
				
				<div class="step-content">
					<span>完成合同</span>
					<div class="step-num">5</div>
					<div class="parting-line"></div>
				</div>
			</div>
			<div style="width: 100%; height: 100%; position: relative;">
				<div class="sub-add-btn">
					<div class="sub-add-btn flex-vcenter ">
						<button class="layui-btn layui-btn-radius layui-btn-normal mag-bot-20" id="add_contract">添加新合同</button>
					</div>
				</div>
				<div id="iframepage-wrap">
				    <iframe src="" frameborder="0" width="100%" height="100%" scroll="no"></iframe>
					<!-- <iframe src="/app/contractInfo/addApproval" frameborder="0" width="100%" height="100%" scroll="no"></iframe> -->
				</div>
			</div>
		
		</section>
	</div>
	<input type="hidden" id="projectId" name="projectId" th:value="${project.id}" />
	<input type="hidden" id="fkTeam" name="fkTeam" th:value="${fkTeam}" />
</body>

<script>
	function parentHeight(h){
            document.getElementById("iframepage-wrap").style.height = h+"px"
    }
	$(function(){
		///app/contractInfo/addDetails
		layui.use('element', function(){
		  var element = layui.element;
		
		  
		});
 		
		$("#add_contract").on("click",function(){
			var projectId=$("#projectId").val();
			var fkTeam = $("#fkTeam").val();
			var iframe = document.createElement('iframe');//动态创建iframe，禁止iframe的src回退；
		    iframe.src = "/app/contractInfo/addDetails/"+projectId+"_"+fkTeam;
		    iframe.width = '100%';
		    iframe.height = '100%';
		    iframe.id = 'team-iframe';
		    $("#iframepage-wrap").html($(iframe));
		    //合同流程第二步
		    $(".step-content").children('.step-num').removeClass('active')
		    $(".step-content").eq(1).children('.step-num').addClass('active')
		    $(".sub-add-btn").hide();
		})
		
	})
</script>
</html>